package com.quick.im.manager.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;

import com.quick.im.common.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户信息表 Mapper 接口
 * </p>
 *
 * @author xhh
 * @since 2025-01-23
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {


    @Select("select * from user ${ew.customSqlSegment}")
    List<User> listUser(@Param(Constants.WRAPPER) QueryWrapper<User> queryWrapper);


    @Select("select * from user where id = #{id} ")
    User getUserById(Integer id);

    @Select("select * from user where mobile = #{mobile} ")
    User getUserByMobile(String mobile);

}

